<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script>
        /*
            数组索引[下标]
        */
        var movie=['徐凤年','红薯','青鸟','徐晓','李淳罡','王仙芝','邓太阿','姜泥','绿袍儿','陈芝豹']
        for(var i=0;i<movie.length;i++)
        {
            document.write(movie[i]+'<br/>')
        }
        console.log(typeof movie);
        //数组转化为字符串
        var str=''
        for(var i=0;i<movie.length;i++)
        {
            str+=movie[i]+'<=>'
        }
        document.write(str)
        console.log(typeof str);

        //筛选数组里面小于10的数组，形成新的数组
        var arr=[5,10,15,20,25,30,35,40]
        var newArr=[];
        for(var i=0;i<arr.length;i++)
        {
            if(arr[i]>10)
            {
                newArr[newArr.length]=arr[i]
            }
        }
        console.log(newArr);


        function Min(arr)
        {
            var min=arr[0];
            for(var i=0;i<arr.length;i++)
            {
                if(arr[i]<min)   //取出每个值来做比较
                {
                    min=arr[i]    //满足条件就赋值
                }
            }
            return min;
        }
        alert(Min(arr))

        

    </script>
</head>
<body>
    
</body>
</html>